package org.example.Day2.Student;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student>students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperateImpl2() {};
    //填入学生信息
        public ClassManager(){

            students.add(new Student("迪丽热巴",'女',99));
            students.add(new Student("古⼒娜扎", '⼥', 100));
            students.add(new Student("⻢尔扎哈", '男', 80));
            students.add(new Student("卡尔扎巴", '男', 60));
        }
        //打印全部信息
        public void printInfo(){
            studentOperator.printAllInfo(students);
        }
        //打印平均分
        public void printScore(){
            studentOperator.printAverageScore(students);
        }


}
